﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace 客户端
{
    class Class1
    {
        public static byte[] getmessage(string mes)
        {
            byte[] data = Encoding.UTF8.GetBytes(mes);
            byte[] datal = BitConverter.GetBytes(data.Length);
            byte[] newdat = datal.Concat(data).ToArray();
            return newdat;
        }
    }
}
